// aion
const getAionData = require('./aion/getData/index');
const getAionDetail = require('./aion/getDetail/index');
const getAionGMM = require('./aion/getGMM/index');
const getAionMsg = require('./aion/getMsg/index');
const getAionVer = require('./aion/getVer/index');
const getAionPeiFang = require('./aion/getPeiFang/index');
// zhuxian
const getCommon = require('./zhuxian/common/index');
const getLogin = require('./zhuxian/getLogin/index');
const getCategory = require('./zhuxian/getCategory/index');
const getData = require('./zhuxian/getData/index');
const getCode = require('./zhuxian/getCode/index');
const getUser = require('./zhuxian/getUser/index');
const getBooth = require('./zhuxian/getBooth/index');
const getContact = require('./zhuxian/getContact/index');
const getOrder = require('./zhuxian/getOrder/index');
const getNeed = require('./zhuxian/getNeed/index');
const getGoods = require('./zhuxian/getGoods/index');
const getClan = require('./zhuxian/getClan/index');
const getGameCian = require('./zhuxian/getGameCian/index');
const getGameUser = require('./zhuxian/getGameUser/index');
const getBbs = require('./zhuxian/getBbs/index');

// 云函数入口函数
exports.main = async (event, context) => {
    const token = event.token
    const gameId = 1

    switch (event.type) {
        // aion
        case 'getAionData':
        return await getAionData.main(event, context);
        case 'getAionDetail':
        return await getAionDetail.main(event, context);
        case 'getAionGMM':
        return await getAionGMM.main(event, context);
        case 'getAionMsg':
        return await getAionMsg.main(event, context);
        case 'getAionVer':
        return await getAionVer.main(event, context);
        case 'getAionPeiFang':
        return await getAionPeiFang.main(event, context);

        // zhuxian
        case 'getCommon':
        return await getCommon.main(event, context);
        case 'getLogin':
        return await getLogin.main(event, context);
        case 'getCategory':
        return await getCategory.main(event, context);
        case 'getData':
        return await getData.main(event, context);
        case 'getCode':
        return await getCode.main(event, context);
        case 'getUser':
        return await getUser.main(event, context,token);
        case 'getBooth':
        return await getBooth.main(event, context,token,gameId);
        case 'getContact':
        return await getContact.main(event, context);
        case 'getOrder':
        return await getOrder.main(event, context,token,gameId);
        case 'getNeed':
        return await getNeed.main(event, context,token,gameId);
        case 'getGoods':
        return await getGoods.main(event, context,token,gameId);
        case 'getClan':
        return await getClan.main(event, context,token,gameId);

        case 'getGameCian':
        return await getGameCian.main(event, context);
        case 'getGameUser':
        return await getGameUser.main(event, context,token);
        case 'getBbs':
        return await getBbs.main(event, context,token);
        
    }
};